<template>
    <view class="all_lotteries">
        <uni-nav-bar fixed status-bar :border="false" left-icon="left" title="奖品详情" @clickLeft="back" />
        <view class="pagebody">
        	<view class="innbox">
        		<view class="drawname textcenter fw">
        			{{ item.draw_name ||'500万现金'}}
        		</view>
				<view class="c_000 f30 textcenter mb15"> 兑奖期限 </view>
				<view class="c_000 f30 textcenter mb15">
					2022-02-02 02:20 至 2022-02-02 02:20
				</view>
				<view class="linestyle mt50 mb50"></view>
				<view class="flexcolumn aligncenter">
					<view class="bnt" v-if="item.is_cash==1">立即兑奖</view>
					<view class="code_box">
						<!--  v-if="item.is_cash==2" -->
					  <view class="code_bt textcenter f32 mb10">兑奖码</view>
					  <view class="code_text">{{ item.code ||'888888888'}}</view>
					</view>
					<view ref="qrcode" id="qrcode" class="qrcode" v-if="item.is_cash==2"></view>
				</view>
				<view class="linestyle mt50 mb50"></view>
				<!-- <view class="c_000 f30"> {{item.task_draw.startime||''}} 至 {{ item.task_draw.endtime }} </view> -->
				<view class="djbox">
					<view class="textcenter f32 c_000">
						兑奖券详情
					</view>
					<view class="mt_10 f28" v-if="item.cash_msg" v-html="item.cash_msg"></view>
					<view v-else class="f28 textcenter mt10 c_696969 ">暂无详情</view>
					<view class="textcenter f32 c_000 mt30">兑奖地址</view>
					<view class="mt10 f28 tac" v-if="item.task_draw.address">{{ item.task_draw.address }}</view>
					<view v-else class="f28 textcenter mt10 c_696969 ">暂无地址</view>
				</view>
				<!-- <view class="linestyle mt50 mb50"></view>
				<view class="djbox">
					<view class="textcenter f32 c_000">兑奖地址</view>
					<view class="mt10 f28 tac" v-if="item.task_draw.address">{{ item.task_draw.address }}</view>
					<view v-else class="f28 textcenter mt10 c_696969 ">暂无地址</view>
				</view> -->
			</view>
        </view>
    </view>
</template>
<script>
export default {
    data() {
        return {
			item:null,
        }
    },
    methods: {
        back() {
            uni.navigateBack();
        },
        getTaskList() {
            const { page, num, type } = this;
            uni.$http.get('/user/public/allTaskIndex', {page, num, type}).then(res => {
                if (res.data.data.list.length) {
                    this.taskList.push(...res.data.data.list);
                } else {
                    this.showMore = false;
                }
            })
        },
        selectEvt(value) {
            this.type = value;
            this.page = '1';
            this.taskList = [];
            this.showMore = true;
            this.getTaskList();
        },
        loadMore() {
            this.page++;
            this.getTaskList();
        },
        jumpPage(value) {
            uni.setStorageSync('task_info', value);
            uni.navigateTo({ url: '/pagesMy/myPrize/index' })
        }
    },
    onLoad() {
        // this.getTaskList();
		// this.getSystemInfo()
		// console.log('navHeight:', this.navHeight)
    },
}
</script>
<style lang="scss" scoped>
.pagebody {
	padding: 20rpx;
	padding-top: 40rpx;
}
.innbox{
	width: 94%;
	margin: auto;
	background-color: #fff;
	box-shadow: 0px 3px 22px 1px rgba(1,60,170,0.16);
	border-radius: 22rpx;
	padding: 40rpx 20rpx;
}
.drawname{
	font-size: 40rpx;
	color: #D83724;
	text-align: center;
	margin-bottom: 28rpx;
}
.linestyle{
  width: 100%;
  height: 1rpx;
  border-bottom: 1px dashed #707070;
}
.bnt{
	background: linear-gradient(142deg, #EFB565 0%, #D83626 100%);
	border-radius: 60rpx;
	color: #ffffff;
	font-size: 32rpx;
	padding: 12rpx 50rpx;
	margin-top: 10rpx;
}
.djbox{
	margin-top: 10rpx;
}
.code_box{
  .code_bt{
	text-align: center;
  }
  .code_text{
	color: #D83724;
	text-align: center;
  }
}
</style>